package com.pactera.madp.daemon.quartz.task;

import com.pactera.madp.common.core.constant.SecurityConstants;
import com.pactera.madp.cp.api.feign.RemoteChannelCodeContactStatisticsService;
import com.pactera.madp.daemon.quartz.constant.enums.MadpQuartzEnum;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * ChannelCodeTask
 *
 * @author jun
 * @version 1.0
 * 2021/8/10 16:52
 **/
@AllArgsConstructor
@Slf4j
@Component("channelCodeTask")
public class ChannelCodeTask {
    private RemoteChannelCodeContactStatisticsService contactStatisticsService;

    /**
     * 定时同步渠道活码-客户统计信息
     */
    @SneakyThrows
    public String channelCodeContact(){
        contactStatisticsService.channelCodeContact(SecurityConstants.FROM_IN);
        return MadpQuartzEnum.JOB_LOG_STATUS_SUCCESS.getType();
    }
}
